package com.baseproject.datasource;

import java.util.List;

import rx.functions.Func1;

/**
 * Created by hp on 2017/6/30.
 */

public class CheckNullFunc1<T extends List, R> implements Func1<T, R> {

    @Override
    public R call(T t) {
        return (t != null && t.size() > 0) ? (R) t.get(0) : null;
    }
}
